package com.itheiam.springboot2condition;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class Springboot2ConditionApplication {

    public static void main(String[] args) {
        //启动springboot的应用,获取到IOC容器
        ConfigurableApplicationContext context = SpringApplication.run(Springboot2ConditionApplication.class, args);
 /*
        //获取Bean,redisTemplate
        Object redisTemplate = context.getBean("redisTemplate");
        System.out.println(redisTemplate);*/

        Object user = context.getBean("user");
        System.out.println(user);
    }

}
